<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>Insert title here</title>
<link  type="text/css" rel="stylesheet" href="/css/style.css" />
<link  type="text/css" rel="stylesheet" href="/css/admin.css">
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/pintuer.js"></script>
</head>


<body>
<form method="post" action="/user/findUserByPage?currentPage=1" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder">用户管理 </strong> </div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <img src="/images/t01.png" /><a  href="/user/inputUser"> 添加用户</a> </li>
        <li> 搜索：</li>
       
     
         <li>
          <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <img src="/images/dp.png" /> 搜索<input type="button" id="findUserByuser">
          </li>
      </ul>
    </div>
    <table class="tablelist">
		<thead>
			<tr>
			    <th width="100" style="text-align:left; padding-left:20px;"><input type="checkbox" name="checkall" id="checkall"><label for="checkall"></label></th>
				<th>序号</th>
				<th>用户名</th>
				<th>密码</th>
				<th>身份证</th>
				<th>地址</th>
				<th>电话</th>
				<th>角色</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<#list ulist as item>
			<tr>
			    <td style="text-align:left; padding-left:20px;"><input type="checkbox" name="ids" value="${item.id}" />
				<td><font color="#FF00FF">${item.id}</td>
				<td>${item.username}</td>
				<td><font color="#FF00FF">${item.password}</td>
				<td>${item.idcard}</td>
				<td><font color="#FF00FF">${item.address}</td>
				<td>${item.number}</td>
				<td>${item.role}</td>
				<td>
				<li class="clickk"><span><img src="/images/t02.png" /></span><a href="/user/editUser?id=${item.id}">修改</a></li>
               <li class="tablelinkdelete"><img src="/images/t03.png" /><a href="href="/user/deleteUser?id=${item.id}"" >删除</a></li>
				<!--  <div class="button-group"><a class="button border-main" href="/user/editUser?id=${item.id}"<span class="icon-edit"></span> 修改</a>-->
               <!--    <a class="button border-red" href="/user/deleteUser?id=${item.id}"  ><span class="icon-trash-o"></span> 删除</a></div> -->
                 
               </td>
			</tr>
			</#list>
		</tbody>
	</table>
	</div>
	</div>

	<div class="pagin">
		<div class="message">
			共<i class="blue">${pager.totalPages}</i>总页数 
			当前显示第&nbsp;<i class="blue">${pager.currentPage}</i>页
		</div>
		<ul class="paginList">

		   <#if !(pager.currentPage>=1)>
		   <li class="paginItem current"><a href="/user/findUserByPage?currentPage=1"   target="right">首页</a></li>
		   <#else>
		   <li class="paginItem"><a href="/user/findUserByPage?currentPage=1" target="right">首页&nbsp;</a></li>
		   </#if>
		   <#if !pager.isHasPrevious()>
		   <li class="paginItem current"><a href="javascript:;"  target="right" >上一页</a></li>
		   <#else>
		    <li class="paginItem"><a href="/user/findUserByPage?currentPage=${pager.currentPage-1}" target="right">上一页&nbsp;</a></li>
		   </#if>
		   <#if !pager.isHasNext()>
		    <li class="paginItem  current"><a href="javascript:;"  target="right">下一页&nbsp;</a></li>
		    <#else>
		    <li class="paginItem "><a href=" /user/findUserByPage?currentPage=${pager.currentPage+1}">下一页</a></li>
		    </#if>
		     <#if !pager.isHasLast()>
		     <li class="paginItem current"><a href="javascript:;">尾页</a></li>
		     <#else>
		     <li class="paginItem"><a href="/user/findUserByPage?currentPage=${pager.totalPages}" target="right">尾页&nbsp;</a></li>
		   </#if>
		</ul>
	</div>
	<!-- 分页菜单组件--------------------------结束 -->
	
<script type="text/javascript">

//搜索
function changesearch(){
	
 $("#listform").submit();
}
//全选
$("#checkall").click(function(){ 
  $("input[name='id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

//批量删除
function delSelect(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		var t=confirm("您确认要删除选中的内容吗？");
		if (t==false) return false;		
		$("#listform").submit();		
	}
	else{
		alert("请选择您要删除的内容!");
		return false;
	}
}

</script>
	
</body>
</html>